<?php e($javascript->codeBlock('$(document).ready(function(){$("#the-table").tableSorter();});'));?>
<div id="images-admin">
	
	<div class="action-buttons">
		<?php e($html->link('Upload Image', '/admin/images/upload',array('class'=>'add')));?>
	</div>
	
	<table id="the-table">
		<caption>Images on <?php e($sitename);?></caption>
		<colgroup>
			<col id="id" />
			<col id="filename" />
			<col id="filesize" />
			<col id="filetype" />
			<col id="alttext" />
			<col id="thumb />"
			<col id="actions" />
		</colgroup>
		<thead>
			<tr>
				<th scope="col">Image ID</th>
				<th scope="col">Image Filename</th>
				<th scope="col">Image Filesize</th>
				<th scope="col">Image Filetype</th>
				<th scope="col">Alt Text</th>
				<th scope="col">Thumbnail</th>
				<th scope="col">Actions</th>
			</tr>
		</thead>
		<tbody>
			<?php $row = 0; ?>
			<?php foreach ($images as $image) : ?>
			<tr class="<?php ($row % 2 ? e('even') : e('odd'));?>">
				<td><?php e($image['Image']['id']);?></td>
				<td><?php e($html->link($image['Image']['filename'], '/images/view/' . $image['Image']['id']));?></td>
				<td><?php e($image['Image']['filesize']);?></td>
				<td><?php e($image['Image']['type']);?></td>
				<td><?php e($image['Image']['alt']);?></td>
				<td><img src="<?php e($file_dir . $thumbs[$image['Image']['id']]);?>" /></td>
				<td>
					<ul>
						<li><?php e($html->link('Edit', '/admin/images/edit/' . $image['Image']['id'], array('class'=>'edit')));?></li>
						<li><?php e($html->link('Delete', '/admin/images/delete/' . $image['Image']['id'], array('class'=>'delete'),'Are you sure you wish to delete post "' . $image['Image']['id'] . '"'));?></li>
					</ul>
				</td>
			</tr>
			<?php $row++; ?>
			<?php endforeach; ?>
		</tbody>
	</table>
</div>

<div id="paginate">
	<span class="previous">
		<?php e($paginator->prev('<< Previous', null, null, array('class' => 'disabled'))); ?>
	</span>
	<span class="next">
		<?php e($paginator->next('Next >>', null, null, array('class' => 'disabled'))); ?>
	</span>
	<br style="clear" />
</div>